Willy Adames drove in two runs in the bottom of the 10th to tie the game, and Jesus Rodriguez walked it off with an RBI single in the bottom of the 12th to help the San Francisco Giants defeat the Pittsburgh Pirates 7-6.